<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>

<style>
body {
	background-color: #97CBFF;
}
</style>
<script>
         $(function()
         {
        	 getStudent();
         })
         
          function getStudent(){
        	 
        	 $.ajax({
        		 url: "/allstudent",
        		 type: "post",
                
        	     success: function(abc){
        	    	 $.each(abc,function(i,fl){
        	    		 var id = fl.sno;//注意要与实体类中的名称相同
                         var name = fl.sname;
                         var sex = fl.ssex;
                         var age=fl.sage;
                         var dept = fl.sdept;
                         var major = fl.smajor;
                         var grade = fl.sgrade;
                         var sc_length = fl.school_length;
                         var address = fl.saddress;
                         var politics = fl.spol;
                         var nation = fl.snation;
                         var rp = fl.srp;
                         var move = fl.smove;
                  
                         var value = "<tr><td align='center'>"+id+"</td>";
                       
                          value +="<td align='center'>"+name+"</td> <td align='center'>"+sex+"</td> <td align='center'>"+age+"</td> <td align='center'>"+dept+"</td> <td align='center'>"+major+"</td> <td align='center'>"+grade+"</td> <td align='center'>"+sc_length+"</td> <td align='center'>"+address+"</td> <td align='center'>"+politics+"</td> <td align='center'>"+nation+"</td> <td align='center'>"+rp+"</td> <td align='center'>"+move+"</td><tr/>";
                
                         $("#tb").append(value);//写入到id为tb的html部分
  	                  });
        	     }
        	 })  
         }
            
         
       </script>

</head>
<body>
	<table id="tb" width="80%" border="1" cellspacing="0" cellpadding="0"
		align="center">
		<tr>

			<th align="center">学号</th>
			<th align="center">姓名</th>
			<th align="center">性别</th>
			<th align="center">年龄</th>
			<th align="center">系别</th>
			<th align="center">专业</th>
			<th align="center">年级</th>
			<th align="center">学制</th>
			<th align="center">地区</th>
			<th align="center">政治面貌</th>
			<th align="center">民族</th>
			<th align="center">奖惩记录</th>
			<th align="center">休复转退标记</th>
			</tr>
	</table>
	<input type="button" value="返回"   style="width: 150px; height: 50px;" onclick="location.href='Administrator.html'"/>
</body>
</html>